package com.eneat.smartrule.restAPI;

import lombok.Getter;

@Getter
public class ServiceException extends RuntimeException {
    protected Integer code;
    protected String desc;
    public ServiceException( ErrorEnum errorEnum ) {
        this.code = errorEnum.getCode();
        this.desc = errorEnum.getDesc();
    }

    public ServiceException( ErrorEnum errorEnum, String desc) {
        this.code = errorEnum.getCode();
        this.desc = desc;
    }
}